Updated the style for GUI to move down when the console is open#201
Updated the style for GUI to move down when the console is open#201
Conversation
|
We should be able to use the |
|
|
||
| const consoleOpen = useAppSelector((state) => state.properties.properties[LuaConsoleIsVisibleKey]?.value) as boolean | undefined; | ||
| const historyLength = useAppSelector((state) => state.properties.properties[LuaConsoleLengthKey]?.value) as number | undefined; | ||
| const consoleTop = historyLength ? historyLength*16 + 36 : 35; |
There was a problem hiding this comment.
| const consoleTop = historyLength ? historyLength*16 + 36 : 35; | |
| const consoleTop = historyLength ? historyLength * 16 + 36 : 35; |
There was a problem hiding this comment.
Haven't checked but we should double check that this works on multiple resolutions so its not a one type of monitor size that it looks good on
| const consoleOpen = useAppSelector((state) => state.properties.properties[LuaConsoleIsVisibleKey]?.value) as boolean | undefined; | ||
| const historyLength = useAppSelector((state) => state.properties.properties[LuaConsoleLengthKey]?.value) as number | undefined; |
There was a problem hiding this comment.
| const consoleOpen = useAppSelector((state) => state.properties.properties[LuaConsoleIsVisibleKey]?.value) as boolean | undefined; | |
| const historyLength = useAppSelector((state) => state.properties.properties[LuaConsoleLengthKey]?.value) as number | undefined; | |
| const consoleOpen = usePropertyValue('BoolProperty', 'LuaConsole.IsVisible'); | |
| const historyLength = usePropertyValue('IntProperty', 'LuaConsole.HistoryLength'); |
|
|
||
| export const LuaConsoleIsVisibleKey = 'LuaConsole.IsVisible'; | ||
| export const LuaConsoleLengthKey = 'LuaConsole.HistoryLength'; |
There was a problem hiding this comment.
| export const LuaConsoleIsVisibleKey = 'LuaConsole.IsVisible'; | |
| export const LuaConsoleLengthKey = 'LuaConsole.HistoryLength'; |
I think we've decided to define these strings locally unless it its being used in multiple places and or is a more complex identifier. See suggestion below
|
|
||
| import 'rc-dock/dist/rc-dock-dark.css'; | ||
| import './WindowLayout.css'; | ||
| import { LuaConsoleIsVisibleKey, LuaConsoleLengthKey } from '@/util/keys'; |
There was a problem hiding this comment.
| import { LuaConsoleIsVisibleKey, LuaConsoleLengthKey } from '@/util/keys'; |
| @@ -4,7 +4,7 @@ import DockLayout, { DockContext, LayoutData, PanelData, TabGroup } from 'rc-doc | |||
| import { FlightController } from '@/panels/FlightControlPanel/FlightController'; | |||
There was a problem hiding this comment.
| import { FlightController } from '@/panels/FlightControlPanel/FlightController'; | |
| import { usePropertyValue } from '@/hooks/properties'; | |
| import { FlightController } from '@/panels/FlightControlPanel/FlightController'; |
|
Looks good to me except when the history is not max. Also the code needs a |
|
I realized that we can scale the UI which makes this a bit tricky as it calculates pixels 🤔 |
|
"we close this for now, unfortunately, due to the issues above and the fragility of the solution" agreed |
|
closing; see earlier comments |





Previously the gui would stay behind the console when it was open, now it ducks underneath the console the way that the dashboard does.
While I guess it's not ideal that this will still happen if you have the gui open in a browser, it seems like its still nice to have for the main openspace use.